Skip to content

Expand the completeness checker with more number field, Dirichlet, and local field cases (LMFDB#7017) - #31

Closed
roed-math wants to merge 2 commits into
mainfrom
ai/t42-completeness-cases
Closed

Expand the completeness checker with more number field, Dirichlet, and local field cases (LMFDB#7017)#31
roed-math wants to merge 2 commits into
mainfrom
ai/t42-completeness-cases

Conversation

@roed-math

Copy link
Copy Markdown
Owner

This adds several new provable-completeness cases to lmfdb/utils/completeness.py, each drawn from the
list in the issue and shipped with its example query as a test. For number fields: a degree-2 field
unramified outside a set S has absolute discriminant dividing 8·∏_{odd p∈S} p (the factor of 8 only when
2∈S), so the search is complete when that bound is within the degree-2 discriminant completeness bound;
a CM field is totally imaginary, which constrains the signature (reducing e.g. degree 2 + CM to the existing
class-number bound); and for imaginary quadratic fields the narrow class number equals the ordinary class
number. For Dirichlet characters, a primitive character has conductor equal to its modulus, so a conductor
bound bounds the modulus. For p-adic fields, discriminant exponent c = 0 means the field is unramified
(e = 1), giving n = f. All additions are gated on specific query keys and use string reasons, leaving
clear_S/display_reason/to_rset untouched. Verified with the flask test client on the issue's example
queries and via new complete/not-complete assertions in test_complete (passing against devmirror); pyflakes clean.
Addresses LMFDB#7017.

🤖 Generated with Claude Code

Add several new provable-completeness cases to lmfdb/utils/completeness.py,
each with a message and a test using the example query from issue LMFDB#7017:

- Number fields: a degree-2 field unramified outside S has |disc| dividing
  8*prod_{odd p in S} p (factor 8 only if 2 in S), so it is complete when that
  product is within the degree-2 discriminant bound (new NFBound.clear_S_disc).
- Number fields: a CM field is totally imaginary, constraining the signature to
  [0, n/2] (n even), which e.g. reduces degree 2 + CM to the class-number bound.
- Number fields: for imaginary quadratic fields r_1 = 0, so the narrow class
  number/group equals the ordinary one.
- Dirichlet characters: a primitive character has conductor equal to its modulus,
  so a conductor bound bounds the modulus.
- p-adic fields: discriminant exponent c = 0 means unramified (e = 1), giving
  n = f via MulFiller (new UnramifiedFiller).

All additions are gated on specific query keys and use string reasons, leaving
clear_S/display_reason/to_rset untouched. Verified with the flask test client on
the issue's example queries (before: no message; after: completeness flash) and
via lmfdb/tests/test_utils.py::test_complete (new complete and not-complete cases),
which passes against devmirror; pyflakes clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@roed-math roed-math changed the title Expand the search completeness checker with more cases (LMFDB#7017) Expand the completeness checker with more number field, Dirichlet, and local field cases (LMFDB#7017) Jul 19, 2026
@roed314

roed314 commented Aug 5, 2026

Copy link
Copy Markdown

GPT signed off.

@roed-math

Copy link
Copy Markdown
Owner Author

Superseded by LMFDB#7167, opened upstream from this same branch. Closing here; review continues upstream.

@roed-math roed-math closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants